// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Replication file for "Making their Mark? How protest sparks, surfs and sustains media issue attention."
// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////

// Data directory: the do file assumes the original datasets (ENA_Items.dta, Protest_Events.dta are in the same directory as the do file. So, adapt the below command to match where you placed the do file on your computer
cd "C:\Users\jonas\Dropbox\Paper Protest\Political Communication\CA\"

// Step 1: creating the media attention measures surrounding each protest event used in the main analysis
// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////

	// We open the protest events data
	use "Protest_Events.dta" , clear
	
	// We drop protests after May 2019, as there is no media data since July 2019
	drop if ENA_datum > mdy(5,31,2019)
	// We drop protests before February 2003, as there is no media data in 2002 (and we need a month before each protest)
	drop if ENA_datum < mdy(2,1,2003)
	// We also need to drop protests in november 2007, as there is a missing week of media data in the first week of november
	gen jaar2 = year(ENA_datum)
	gen maand = month(ENA_datum)
	gen testje = (maand==11 & jaar2 ==2007)
	drop if testje == 1
	drop jaar2 maand testje	

	// Creating all the variables we will need to store the calculated values
	// We calculate VTM / VRT separately, weighted and unweighted
	
	gen mediaatt_both_w1 = .              // media attention on VTM and VRT, 4 weeks before protest
	gen mediaatt_both_w2 = .              // media attention on VTM and VRT, 3 weeks before protest
	gen mediaatt_both_w3 = .              // media attention on VTM and VRT, 2 weeks before protest
	gen mediaatt_both_w4 = .              // media attention on VTM and VRT, 1 week before protest
	gen mediaatt_both_w5 = .              // media attention on VTM and VRT, 1 week after protest
	gen mediaatt_both_w6 = .              // media attention on VTM and VRT, 2 week after protest
	gen mediaatt_both_w7 = .              // media attention on VTM and VRT, 3 week after protest
	gen mediaatt_both_w8 = .              // media attention on VTM and VRT, 4 week after protest
	gen ttest_both_w1 = .                 // ttest for VTM and VRT, 4 weeks before protest
	gen ttest_both_w2 = .                 // ttest for VTM and VRT, 3 weeks before protest
	gen ttest_both_w3 = .                 // ttest for VTM and VRT, 2 weeks before protest
	gen ttest_both_w4 = .                 // ttest for VTM and VRT, 1 week before protest
	gen ttest_both_w5 = .                 // ttest for VTM and VRT, 1 week after protest
	gen ttest_both_w6 = .                 // ttest for VTM and VRT, 2 week after protest
	gen ttest_both_w7 = .                 // ttest for VTM and VRT, 3 week after protest
	gen ttest_both_w8 = .                 // ttest for VTM and VRT, 4 week after protest
	
	gen mediaatt_both_w1_noprotest = .              // media attention on VTM and VRT, 4 weeks before protest
	gen mediaatt_both_w2_noprotest = .              // media attention on VTM and VRT, 3 weeks before protest
	gen mediaatt_both_w3_noprotest = .              // media attention on VTM and VRT, 2 weeks before protest
	gen mediaatt_both_w4_noprotest = .              // media attention on VTM and VRT, 1 week before protest
	gen mediaatt_both_w5_noprotest = .              // media attention on VTM and VRT, 1 week after protest
	gen mediaatt_both_w6_noprotest = .              // media attention on VTM and VRT, 2 week after protest
	gen mediaatt_both_w7_noprotest = .              // media attention on VTM and VRT, 3 week after protest
	gen mediaatt_both_w8_noprotest = .              // media attention on VTM and VRT, 4 week after protest
	gen ttest_both_w1_noprotest = .                 // ttest for VTM and VRT, 4 weeks before protest
	gen ttest_both_w2_noprotest = .                 // ttest for VTM and VRT, 3 weeks before protest
	gen ttest_both_w3_noprotest = .                 // ttest for VTM and VRT, 2 weeks before protest
	gen ttest_both_w4_noprotest = .                 // ttest for VTM and VRT, 1 week before protest
	gen ttest_both_w5_noprotest = .                 // ttest for VTM and VRT, 1 week after protest
	gen ttest_both_w6_noprotest = .                 // ttest for VTM and VRT, 2 week after protest
	gen ttest_both_w7_noprotest = .                 // ttest for VTM and VRT, 3 week after protest
	gen ttest_both_w8_noprotest = .                 // ttest for VTM and VRT, 4 week after protest

	// We create a matrix - essentially just an empty excel sheet that is kept in memory, which enables us to loop over each of these protest items
	// In the matrix we store the following: the date of the protest, the topic code (ProtestIssue), and the 56 empty media attention variables we just created, which will be filled up with the ENA measurements
	mkmat ENA_datum ProtestIssue mediaatt_both_w1-ttest_both_w8_noprotest, matrix(protestitems)
	
	
	// Now we do to the ENA dataset
	use ENA_Items.dta, clear
		
	// The loop goes over the items in the matrix, row by row, and summarizes attention for the different issues before (7 days before the day of the news item) and after (the day of the news item, and the subsequent 6 days)
	
	local aantal = rowsof(protestitems)
	display "aantal items:" `aantal'
	forvalues x = 1(1)`aantal' {
		display "Bezig met protestitem " `x' " van " `aantal'
		local issuecode = protestitems[`x',2]
		
		// First, we calculate the date of a year before the protest, and put that in a local, as well as the day of the protest
		local yearbefore = protestitems[`x',1] - (52 * 7)
		local dayofprotest = protestitems[`x',1]
		local daybeforeprotest = protestitems[`x',1] - 1
		local week4beforeprotest = protestitems[`x',1] - 28
		local week3beforeprotest = protestitems[`x',1] - 21
		local week2beforeprotest = protestitems[`x',1] - 14
		local weekbeforeprotest = protestitems[`x',1] - 7
		local weekafterprotest = protestitems[`x',1] + 7
		local week2afterprotest = protestitems[`x',1] + 14
		local week3afterprotest = protestitems[`x',1] + 21
		local week4afterprotest = protestitems[`x',1] + 28
		
		display "dayofprotest = " %td `dayofprotest' 
		display "week4beforeprotest = " %td `week4beforeprotest' 
		display "week3beforeprotest = " %td `week3beforeprotest' 
		display "week2beforeprotest = " %td `week2beforeprotest' 
		display "weekbeforeprotest = " %td `weekbeforeprotest' 
		display "weekafterprotest = " %td `weekafterprotest' 
		display "week2afterprotest = " %td `week2afterprotest' 
		display "week3afterprotest = " %td `week3afterprotest' 
		display "week4afterprotest = " %td `week4afterprotest' 
		
		// Next, we start filling out the variables
		// column 3 is where the vars start, so 3 = start VTM, 11 start VTM ttest, 19 start VRT, 27 start VRT ttest, 35 start VTM no protest, 43 start  ttest, 51 start VRT no protest, 59 start ttest
		display "Week 4 before protest"
		quietly gen d_comparison = .
		quietly replace d_comparison = 0 if datum >= `yearbefore' & datum < `week4beforeprotest'
		quietly replace d_comparison = 1 if datum >= `week4beforeprotest' & datum < `week3beforeprotest'
		quietly ttest IA_`issuecode', by(d_comparison)
		matrix protestitems[`x',3] = r(mu_2) - r(mu_1)
		matrix protestitems[`x',11] = r(p_l)
		quietly ttest IA_`issuecode' if protest_d == 0, by(d_comparison)
		matrix protestitems[`x',19] = r(mu_2) - r(mu_1)
		matrix protestitems[`x',27] = r(p_l)	
	
		display "Week 3 before protest"
		quietly replace d_comparison = .
		quietly replace d_comparison = 0 if datum >= `yearbefore' & datum < `week4beforeprotest'
		quietly replace d_comparison = 1 if datum >= `week3beforeprotest' & datum < `week2beforeprotest'
		quietly ttest IA_`issuecode', by(d_comparison)
		matrix protestitems[`x',4] = r(mu_2) - r(mu_1)
		matrix protestitems[`x',12] = r(p_l)
		quietly ttest IA_`issuecode' if protest_d == 0, by(d_comparison)
		matrix protestitems[`x',20] = r(mu_2) - r(mu_1)
		matrix protestitems[`x',28] = r(p_l)	
		
		display "Week 2 before protest"
		quietly replace d_comparison = .
		quietly replace d_comparison = 0 if datum >= `yearbefore' & datum < `week4beforeprotest'
		quietly replace d_comparison = 1 if datum >= `week2beforeprotest' & datum < `weekbeforeprotest'
		quietly ttest IA_`issuecode', by(d_comparison)
		matrix protestitems[`x',5] = r(mu_2) - r(mu_1)
		matrix protestitems[`x',13] = r(p_l)
		quietly ttest IA_`issuecode' if protest_d == 0, by(d_comparison)
		matrix protestitems[`x',21] = r(mu_2) - r(mu_1)
		matrix protestitems[`x',29] = r(p_l)	
		
		display "Week before protest"
		quietly replace d_comparison = .
		quietly replace d_comparison = 0 if datum >= `yearbefore' & datum < `week4beforeprotest'
		quietly replace d_comparison = 1 if datum >= `weekbeforeprotest' & datum < `dayofprotest'
		quietly ttest IA_`issuecode' , by(d_comparison)
		matrix protestitems[`x',6] = r(mu_2) - r(mu_1)
		matrix protestitems[`x',14] = r(p_l)
		quietly ttest IA_`issuecode' if protest_d == 0, by(d_comparison)
		matrix protestitems[`x',22] = r(mu_2) - r(mu_1)
		matrix protestitems[`x',30] = r(p_l)	
		
		display "Week after protest"
		quietly replace d_comparison = .
		quietly replace d_comparison = 0 if datum >= `yearbefore' & datum < `week4beforeprotest'
		quietly replace d_comparison = 1 if datum >= `dayofprotest' & datum < `weekafterprotest'
		quietly ttest IA_`issuecode' , by(d_comparison)
		matrix protestitems[`x',7] = r(mu_2) - r(mu_1)
		matrix protestitems[`x',15] = r(p_l)
		quietly ttest IA_`issuecode' if protest_d == 0, by(d_comparison)
		matrix protestitems[`x',23] = r(mu_2) - r(mu_1)
		matrix protestitems[`x',31] = r(p_l)		
	
		display "Week 2 after protest"
		quietly replace d_comparison = .
		quietly replace d_comparison = 0 if datum >= `yearbefore' & datum < `week4beforeprotest'
		quietly replace d_comparison = 1 if datum >= `weekafterprotest' & datum < `week2afterprotest'
		quietly ttest IA_`issuecode' , by(d_comparison)
		matrix protestitems[`x',8] = r(mu_2) - r(mu_1)
		matrix protestitems[`x',16] = r(p_l)
		quietly ttest IA_`issuecode' if protest_d == 0, by(d_comparison)
		matrix protestitems[`x',24] = r(mu_2) - r(mu_1)
		matrix protestitems[`x',32] = r(p_l)	
		
		display "Week 3 after protest"
		quietly replace d_comparison = .
		quietly replace d_comparison = 0 if datum >= `yearbefore' & datum < `week4beforeprotest'
		quietly replace d_comparison = 1 if datum >= `week2afterprotest' & datum < `week3afterprotest'
		quietly ttest IA_`issuecode' , by(d_comparison)
		matrix protestitems[`x',9] = r(mu_2) - r(mu_1)
		matrix protestitems[`x',17] = r(p_l)
		quietly ttest IA_`issuecode' if protest_d == 0, by(d_comparison)
		matrix protestitems[`x',25] = r(mu_2) - r(mu_1)
		matrix protestitems[`x',33] = r(p_l)		
	
		display "Week 4 after protest"
		quietly replace d_comparison = .
		quietly replace d_comparison = 0 if datum >= `yearbefore' & datum < `week4beforeprotest'
		quietly replace d_comparison = 1 if datum >= `week3afterprotest' & datum < `week4afterprotest'
		quietly ttest IA_`issuecode' , by(d_comparison)
		matrix protestitems[`x',10] = r(mu_2) - r(mu_1)
		matrix protestitems[`x',18] = r(p_l)
		quietly ttest IA_`issuecode' if protest_d == 0, by(d_comparison)
		matrix protestitems[`x',26] = r(mu_2) - r(mu_1)
		matrix protestitems[`x',34] = r(p_l)	
		
		drop d_comparison
		
	}
	
		
	// Matrix omzetten naar een databestand, en opslaan
	clear
	svmat protestitems, names(col)
	
	gen id = _n
	
	saveold "mediaprotest_both.dta", replace
	

// Step 2: creating the media attention measures that exclude the day of the protest (for robustness checks)
// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////
	
	
	// We open the protest events data
	use "Protest_Events" , clear
	
	// We drop protests after May 2019, as there is no media data since July 2019
	drop if ENA_datum > mdy(5,31,2019)
	// We drop protests before February 2003, as there is no media data in 2002 (and we need a month before each protest)
	drop if ENA_datum < mdy(2,1,2003)
	// We also need to drop protests in november 2007, as there is a missing week of media data in the first week of november
	gen jaar2 = year(ENA_datum)
	gen maand = month(ENA_datum)
	gen testje = (maand==11 & jaar2 ==2007)
	drop if testje == 1
	drop jaar2 maand testje
	
	// Creating all the variables we will need to store the calculated values
	
	gen mediaatt_both_w5_nodayprotest = .              // media attention on VTM and VRT, 1 week before protest
	gen ttest_both_w5_nodayprotest = .                 // ttest for VTM and VRT, 1 week before protest
	gen mediaatt_both_yearbefore = .
	
	
	// We create a matrix - essentially just an empty excel sheet that is kept in memory, which enables us to loop over each of these protest items
	// In the matrix we store the following: the date of the protest, the topic code (ProtestIssue), and the 56 empty media attention variables we just created, which will be filled up with the ENA measurements
	mkmat ENA_datum ProtestIssue mediaatt_both_w5_nodayprotest ttest_both_w5_nodayprotest mediaatt_both_yearbefore, matrix(protestitems)
	
	
	// Now we do to the ENA dataset
	use "ENA_Items.dta", clear
	
	
	// The loop goes over the items in the matrix, row by row, and summarizes attention for the different issues before (7 days before the day of the news item) and after (the day of the news item, and the subsequent 6 days)
	
	local aantal = rowsof(protestitems)
	display "aantal items:" `aantal'
	forvalues x = 1(1)`aantal' {
		display "Bezig met protestitem " `x' " van " `aantal'
		local issuecode = protestitems[`x',2]
		
		// First, we calculate the date of a year before the protest, and put that in a local, as well as the day of the protest
		local dayofprotest = protestitems[`x',1]
		local dayafterprotest = protestitems[`x',1] + 1	
		local weekafterprotest = protestitems[`x',1] + 7
		local week4beforeprotest = protestitems[`x',1] - 28
		local yearbefore = protestitems[`x',1] - (52 * 7)
		
		display "dayofprotest = " %td `dayofprotest' 
		display "dayafterprotest = " %td `dayafterprotest'
		display "weekafterprotest = " %td `weekafterprotest' 
		
		display "Week after protest"
		gen d_comparison = .
		quietly replace d_comparison = 0 if datum >= `yearbefore' & datum < `week4beforeprotest'
		quietly replace d_comparison = 1 if datum >= `dayafterprotest' & datum < `weekafterprotest'
		quietly ttest IA_`issuecode' , by(d_comparison)
		matrix protestitems[`x',3] = r(mu_2) - r(mu_1)
		matrix protestitems[`x',4] = r(p_l)
		matrix protestitems[`x',5] = r(mu_1)
		
		drop d_comparison
		
	}
	
		
	// Convert matrix to a dataset, and save it
	clear
	svmat protestitems, names(col)
	
	gen id = _n
	
	saveold "mediaprotest_both_nodayprotest.dta", replace
	
	
// Step 3: creating the media attention measures split for VTM and VRT (for robustness checks)
// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////
	
	// We open the protest events data
	use "Protest_Events" , clear

	// We drop protests after May 2019, as there is no media data since July 2019
	drop if ENA_datum > mdy(5,31,2019)
	// We drop protests before February 2003, as there is no media data in 2002 (and we need a month before each protest)
	drop if ENA_datum < mdy(2,1,2003)
	// We also need to drop protests in november 2007, as there is a missing week of media data in the first week of november
	gen jaar2 = year(ENA_datum)
	gen maand = month(ENA_datum)
	gen testje = (maand==11 & jaar2 ==2007)
	drop if testje == 1
	drop jaar2 maand testje
	
	// Creating all the variables we will need to store the calculated values
	// We calculate VTM / VRT separately, weighted and unweighted
	
	gen mediaatt_VTM_w5 = .              // media attention on VTM, 1 week after protest	
	gen mediaatt_VRT_w5 = .              // media attention on VRT, 1 week after protest	
	gen mediaatt_VTM_w5_noprotest = .              // media attention on VTM, 1 week after protest	
	gen mediaatt_VRT_w5_noprotest = .              // media attention on VRT, 1 week after protest
	
	
	// We create a matrix - essentially just an empty excel sheet that is kept in memory, which enables us to loop over each of these protest items
	// In the matrix we store the following: the date of the protest, the topic code (ProtestIssue), and the 56 empty media attention variables we just created, which will be filled up with the ENA measurements
	mkmat ENA_datum ProtestIssue mediaatt_VTM_w5-mediaatt_VRT_w5_noprotest, matrix(protestitems)
		
	// Now we do to the ENA dataset
	use "ENA_Items.dta", clear	
	
	// The loop goes over the items in the matrix, row by row, and summarizes attention for the different issues before (7 days before the day of the news item) and after (the day of the news item, and the subsequent 6 days)
	
	local aantal = rowsof(protestitems)
	display "aantal items:" `aantal'
	forvalues x = 1(1)`aantal' {
		display "Bezig met protestitem " `x' " van " `aantal'
		local issuecode = protestitems[`x',2]
		
		// First, we calculate the date of a year before the protest, and put that in a local, as well as the day of the protest
		local yearbefore = protestitems[`x',1] - (52 * 7)
		local dayofprotest = protestitems[`x',1]
		local daybeforeprotest = protestitems[`x',1] - 1
		local week4beforeprotest = protestitems[`x',1] - 28
		local week3beforeprotest = protestitems[`x',1] - 21
		local week2beforeprotest = protestitems[`x',1] - 14
		local weekbeforeprotest = protestitems[`x',1] - 7
		local weekafterprotest = protestitems[`x',1] + 7
		local week2afterprotest = protestitems[`x',1] + 14
		local week3afterprotest = protestitems[`x',1] + 21
		local week4afterprotest = protestitems[`x',1] + 28
		
		display "dayofprotest = " %td `dayofprotest' 
		display "week4beforeprotest = " %td `week4beforeprotest' 
		display "week3beforeprotest = " %td `week3beforeprotest' 
		display "week2beforeprotest = " %td `week2beforeprotest' 
		display "weekbeforeprotest = " %td `weekbeforeprotest' 
		display "weekafterprotest = " %td `weekafterprotest' 
		display "week2afterprotest = " %td `week2afterprotest' 
		display "week3afterprotest = " %td `week3afterprotest' 
		display "week4afterprotest = " %td `week4afterprotest' 
		
		// Next, we start filling out the variables
		// column 3 is where the vars start, so 3 = start VTM, 11 start VTM ttest, 19 start VRT, 27 start VRT ttest, 35 start VTM no protest, 43 start  ttest, 51 start VRT no protest, 59 start ttest
		quietly gen d_comparison = .
		display "Week after protest"
		quietly replace d_comparison = .
		quietly replace d_comparison = 0 if datum >= `yearbefore' & datum < `week4beforeprotest'
		quietly replace d_comparison = 1 if datum >= `dayofprotest' & datum < `weekafterprotest'
		quietly ttest IA_`issuecode' if medium == "VTM", by(d_comparison)
		matrix protestitems[`x',3] = r(mu_2) - r(mu_1)
		quietly ttest IA_`issuecode' if medium == "VRT", by(d_comparison)
		matrix protestitems[`x',4] = r(mu_2) - r(mu_1)
		quietly ttest IA_`issuecode' if protest_d == 0 & medium == "VTM", by(d_comparison)
		matrix protestitems[`x',5] = r(mu_2) - r(mu_1)
		quietly ttest IA_`issuecode' if protest_d == 0 & medium == "VRT", by(d_comparison)
		matrix protestitems[`x',6] = r(mu_2) - r(mu_1)
		
		drop d_comparison
		
	}
	
		
	// Convert matrix to dataset, and save it
	clear
	svmat protestitems, names(col)
	
	gen id = _n
	
	saveold "mediaprotest_split.dta", replace
	
	
// Step 4: Merging the protest events dataset with the media attention datasets we just created
// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////


	use "Protest_Events" , clear
	// We drop protests after May 2019, as there is no media data since July 2019
	drop if ENA_datum > mdy(5,31,2019)
	// We drop protests before February 2003, as there is no media data in 2002 (and we need a month before each protest)
	drop if ENA_datum < mdy(2,1,2003)
	// We also need to drop protests in november 2007, as there is a missing week of media data in the first week of november
	gen jaar2 = year(ENA_datum)
	gen maand = month(ENA_datum)
	gen testje = (maand==11 & jaar2 ==2007)
	drop if testje == 1
	drop jaar2 maand testje
	gen id = _n
	
	// Adding the protest issue attention series used for the main analysis
	merge 1:1 id using "mediaprotest_both.dta"
	save "makingtheirmark_workingfile.dta", replace
	
	// Adding the protest issue attention series that excludes the day of the protest
	use "makingtheirmark_workingfile.dta", clear
	drop _merge
	merge 1:1 id using "mediaprotest_both_nodayprotest.dta"
	save "makingtheirmark_workingfile.dta", replace

	// Adding the protest issue attention series that excludes the day of the protest
	use "makingtheirmark_workingfile.dta", clear
	drop _merge
	merge 1:1 id using "mediaprotest_split.dta"
	save "makingtheirmark_workingfile.dta", replace


// Step 5: Adding additional variables we'll need in the analysis
// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////


	use "makingtheirmark_workingfile.dta", clear
	gen N_newsturnout10000 = N_newsturnout / 10000
	gen PP_sumscale = PP_arrests + PP_wounded + PP_arro + PP_destruction + PP_nuisance
	gen d_PP_sumscale = (PP_sumscale > 0) if !missing(PP_sumscale)
	generate d_vrt = (zender == 2)

	// generating dummy variables for the t-tests, makes it easier to create the protest categories
	foreach x of varlist ttest_both_w1-ttest_both_w8 {
		gen d_`x' = (`x' < 0.05)
	}
	summarize d_ttest*, separator(0)
	
	foreach x of varlist ttest_both_w1_noprotest- ttest_both_w8_noprotest {
		gen d_`x' = (`x' < 0.05)
	}
	summarize d_ttest*_noprotest, separator(0)
	
	
	foreach x of varlist ttest_both_w1-ttest_both_w8 {
		gen d_p10_`x' = (`x' < 0.01)
	}
	summarize d_p10_ttest*, separator(0)
	
	foreach x of varlist ttest_both_w1_noprotest- ttest_both_w8_noprotest {
		gen d_p10_`x' = (`x' < 0.01)
	}
	summarize d_p10_ttest*_noprotest, separator(0)
	
	
	// Five categories
	label define protestcat_lbl 0 "Suckers" 1 "Sparks" 2 "Sustainers" 3 "Surfers" 4 "Surf+Sust"
	
	gen protest_category_both = 0
	label values protest_category_both protestcat_lbl
	replace protest_category_both = 1 if (d_ttest_both_w5 == 1) & (d_ttest_both_w4 == 0) & (d_ttest_both_w6 == 0)
	replace protest_category_both = 2 if (d_ttest_both_w5 == 1) & (d_ttest_both_w4 == 0) & (d_ttest_both_w6 == 1)
	replace protest_category_both = 3 if (d_ttest_both_w5 == 1) & (d_ttest_both_w4 == 1) & (d_ttest_both_w6 == 0)
	replace protest_category_both = 4 if (d_ttest_both_w5 == 1) & (d_ttest_both_w4 == 1) & (d_ttest_both_w6 == 1)
	tab protest_category_both
	
	gen protest_category_both_np = 0
	label values protest_category_both_np protestcat_lbl
	replace protest_category_both_np = 1 if (d_ttest_both_w5_noprotest == 1) & (d_ttest_both_w4_noprotest == 0) & (d_ttest_both_w6_noprotest == 0)
	replace protest_category_both_np = 2 if (d_ttest_both_w5_noprotest == 1) & (d_ttest_both_w4_noprotest == 0) & (d_ttest_both_w6_noprotest == 1)
	replace protest_category_both_np = 3 if (d_ttest_both_w5_noprotest == 1) & (d_ttest_both_w4_noprotest == 1) & (d_ttest_both_w6_noprotest == 0)
	replace protest_category_both_np = 4 if (d_ttest_both_w5_noprotest == 1) & (d_ttest_both_w4_noprotest == 1) & (d_ttest_both_w6_noprotest == 1)
	tab protest_category_both_np
	
	
	// 11 issue categorisation
	recode ProtestIssue_15cat (2=0) (3=0) (11=0) (17 = 0) (19 = 0), gen(issue_11)
	label define issue11_lbl 0 "Other" 1 "Economic crisis" 4 "Work" 9 "Climate" 10 "Civil rights" 12 "Human rights" 13 "Crime & safety" 14 "Migration" 15 "Terrorism" 16 "War & peace" 18 "Nationalism"
	label values issue_11 issue11_lbl 
	tab issue_11, gen(d_issue)
	
	save "makingtheirmark_workingfile.dta", replace

// Analysis - Main text
// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////

	// Table 2: bivariate tests comparing issue categories
	// ///////////////////////////////////////////////////////////////////////////////////////
	use "makingtheirmark_workingfile.dta", clear
	
	// Protest features
	tabstat N_newsturnout N_discexp_combo union_d D_diversity_d U_agreetyp_d d_PP_sumscale C_other_actie_d C_campagne_past C_campagne_toekomst , by(protest_category_both) statistics(mean) columns(statistics)
	
	// Media features
	tabstat FE_focusingevent FE_routine FE_ongoingcrisis, by(protest_category_both) statistics(mean) columns(statistics)
	
	// Controls
	tabstat duur d_vrt d_issue2- d_issue11, by(protest_category_both) statistics(mean) columns(statistics)
	
	// Significance testing:
	foreach y of varlist N_newsturnout N_discexp_combo union_d D_diversity_d U_agreetyp_d d_PP_sumscale C_other_actie_d C_campagne_past C_campagne_toekomst FE_focusingevent FE_routine FE_ongoingcrisis duur d_vrt d_issue2- d_issue11 {
		forvalues x = 0(1)4 {
			quietly summarize `y'
			local gemiddelde = `r(mean)'
			quietly ttest `y' == `gemiddelde' if protest_category_both == `x'
			global result_`x' = `r(p)'
		}
		display "ttest results for `y'  " $result_0 " " $result_1 " " $result_2 " " $result_3 " " $result_4
	}


	// Table 3: regression of post-protest attention
	// ///////////////////////////////////////////////////////////////////////////////////////
	use "makingtheirmark_workingfile.dta", clear
	
	// Media attention variable expressed as 0 to 100 instead of 0.00 to 1.00 for readability of coefficients
	gen mediaatt_both_w5_100 = mediaatt_both_w5 * 100
	
	*Model1.
	regress mediaatt_both_w5_100 N_newsturnout10000 N_discexp_combo union_d D_diversity_d U_agreetyp_d d_PP_sumscale C_other_actie_d C_campagne_past C_campagne_toekomst
	// outreg2 using "c:\temp\20210408_table4_m1",  word dec(2) replace alpha(0.001, 0.01, 0.05, 0.10) symbol(***,**,*,+) sideway
	*Model2.
	regress mediaatt_both_w5_100 d_ttest_both_w4 FE_focusingevent FE_routine FE_ongoingcrisis
	// outreg2 using "c:\temp\20210408_table4_m2",  word dec(2) replace alpha(0.001, 0.01, 0.05, 0.10) symbol(***,**,*,+) sideway
	*Model3
	regress mediaatt_both_w5_100 N_newsturnout10000 N_discexp_combo union_d D_diversity_d U_agreetyp_d d_PP_sumscale C_other_actie_d C_campagne_past C_campagne_toekomst d_ttest_both_w4 FE_focusingevent FE_routine FE_ongoingcrisis
	// outreg2 using "c:\temp\20210408_table4_m3",  word dec(2) replace alpha(0.001, 0.01, 0.05, 0.10) symbol(***,**,*,+) sideway
	*Model4.
	regress mediaatt_both_w5_100 N_newsturnout10000 N_discexp_combo union_d D_diversity_d U_agreetyp_d d_PP_sumscale C_other_actie_d C_campagne_past C_campagne_toekomst d_ttest_both_w4 FE_focusingevent FE_routine FE_ongoingcrisis duur d_vrt d_issue1 d_issue2 d_issue4 - d_issue11
	// outreg2 using "c:\temp\20210408_table4_m4",  word dec(2) replace alpha(0.001, 0.01, 0.05, 0.10) symbol(***,**,*,+) sideway
	*model5.
	regress mediaatt_both_w5_100 N_newsturnout10000 N_discexp_combo union_d D_diversity_d U_agreetyp_d d_PP_sumscale C_other_actie_d C_campagne_past C_campagne_toekomst c.d_ttest_both_w4 i.FE_focusingevent i.FE_routine i.FE_ongoingcrisis c.d_ttest_both_w4#i.FE_focusingevent c.d_ttest_both_w4#i.FE_routine c.d_ttest_both_w4#i.FE_ongoingcrisis  duur d_vrt d_issue1 d_issue2 d_issue4 - d_issue11
	// outreg2 using "c:\temp\20210408_table4_m5",  word dec(2) replace alpha(0.001, 0.01, 0.05, 0.10) symbol(***,**,*,+) sideway


	// Figure 1: media attention both throughout the 8 weeks.
	// ///////////////////////////////////////////////////////////////////////////////////////
	use "makingtheirmark_workingfile.dta", clear
	rename mediaatt_both_w1_noprotest  mediaatt_both_np_w1
	rename mediaatt_both_w2_noprotest  mediaatt_both_np_w2
	rename mediaatt_both_w3_noprotest  mediaatt_both_np_w3
	rename mediaatt_both_w4_noprotest  mediaatt_both_np_w4 
	rename mediaatt_both_w5_noprotest  mediaatt_both_np_w5 
	rename mediaatt_both_w6_noprotest  mediaatt_both_np_w6 
	rename mediaatt_both_w7_noprotest  mediaatt_both_np_w7 
	rename mediaatt_both_w8_noprotest  mediaatt_both_np_w8 
	
	rename mediaatt_both_w5_nodayprotest mediaatt_both_noday_w5 
	gen mediaatt_both_noday_w1 = mediaatt_both_w1 
	gen mediaatt_both_noday_w2 = mediaatt_both_w2
	gen mediaatt_both_noday_w3 = mediaatt_both_w3
	gen mediaatt_both_noday_w4 = mediaatt_both_w4
	gen mediaatt_both_noday_w6 = mediaatt_both_w6
	gen mediaatt_both_noday_w7 = mediaatt_both_w7
	gen mediaatt_both_noday_w8 = mediaatt_both_w8
		
	reshape long mediaatt_both_w mediaatt_both_np_w mediaatt_both_noday_w, i(id)
	collapse (mean) both_avg = mediaatt_both_w both_avg_np = mediaatt_both_np_w both_avg_nd = mediaatt_both_noday_w , by(_j)
	
	graph twoway line both_avg _j, yline(0) scheme(s2mono) title("Media Attention for Protest Issue") xlabel(1 "4w before" 2 "3w before" 3 "2w before" 4 "1w before" 5 "1w after" 6 "2w after" 7 "3w after" 8 "4w after", angle(45)) xscale(range(0.5 8.5)) ylabel(-0.01 "-1%" 0 "0%" 0.01 "+1%" 0.02 "+2%" 0.03 "+3%"  0.04 "+4%") xtitle(" ") ytitle(" ")
	// graph export "c:\temp\20210329_MakingMark_Figure1.jpg", as(jpg) replace width(1000) height(1000) 
	

	// Figure 2: media attention pattern by category
	// ///////////////////////////////////////////////////////////////////////////////////////
	use "makingtheirmark_workingfile.dta", clear
	
	// Percent of protests categorized in each category
	tab protest_category_both
	
	// Figure 2 requires a reshape of the data to long
	rename mediaatt_both_w1_noprotest  mediaatt_both_np_w1
	rename mediaatt_both_w2_noprotest  mediaatt_both_np_w2
	rename mediaatt_both_w3_noprotest  mediaatt_both_np_w3
	rename mediaatt_both_w4_noprotest  mediaatt_both_np_w4 
	rename mediaatt_both_w5_noprotest  mediaatt_both_np_w5 
	rename mediaatt_both_w6_noprotest  mediaatt_both_np_w6 
	rename mediaatt_both_w7_noprotest  mediaatt_both_np_w7 
	rename mediaatt_both_w8_noprotest  mediaatt_both_np_w8 
	reshape long mediaatt_both_w  mediaatt_both_np_w , i(id)
	collapse (mean) both_avg = mediaatt_both_w both_avg_np = mediaatt_both_np_w , by(protest_category_both _j)
	
	graph twoway line both_avg _j if protest_category_both == 0, yline(0) scheme(s2mono) title("Stagnants") xlabel(1 "4w before" 2 "3w before" 3 "2w before" 4 "1w before" 5 "1w after" 6 "2w after" 7 "3w after" 8 "4w after", angle(45)) xscale(range(0.5 8.5)) ylabel(-0.02 "-2%" 0 "0%" 0.02 "+2%" 0.04 "+4%" 0.06 "+6%" 0.08 "+8%" 0.10 "+10%" 0.12 "+12%", labsize(vsmall)) xtitle(" ") ytitle(" ")
	graph save both_0, replace
	graph twoway line both_avg _j if protest_category_both == 1, yline(0) scheme(s2mono) title("Sparks") xlabel(1 "4w before" 2 "3w before" 3 "2w before" 4 "1w before" 5 "1w after" 6 "2w after" 7 "3w after" 8 "4w after", angle(45)) xscale(range(0.5 8.5)) ylabel(-0.02 "-2%" 0 "0%" 0.02 "+2%" 0.04 "+4%" 0.06 "+6%" 0.08 "+8%" 0.10 "+10%" 0.12 "+12%", labsize(vsmall)) xtitle(" ") ytitle(" ")
	graph save both_1, replace
	graph twoway line both_avg _j if protest_category_both == 2, yline(0) scheme(s2mono) title("Sustainers") xlabel(1 "4w before" 2 "3w before" 3 "2w before" 4 "1w before" 5 "1w after" 6 "2w after" 7 "3w after" 8 "4w after", angle(45)) xscale(range(0.5 8.5)) ylabel(-0.02 "-2%" 0 "0%" 0.02 "+2%" 0.04 "+4%" 0.06 "+6%" 0.08 "+8%" 0.10 "+10%" 0.12 "+12%", labsize(vsmall)) xtitle(" ") ytitle(" ")
	graph save both_2, replace
	graph twoway line both_avg _j if protest_category_both == 3, yline(0) scheme(s2mono) title("Surfers") xlabel(1 "4w before" 2 "3w before" 3 "2w before" 4 "1w before" 5 "1w after" 6 "2w after" 7 "3w after" 8 "4w after", angle(45)) xscale(range(0.5 8.5)) ylabel(-0.02 "-2%" 0 "0%" 0.02 "+2%" 0.04 "+4%" 0.06 "+6%" 0.08 "+8%" 0.10 "+10%" 0.12 "+12%", labsize(vsmall)) xtitle(" ") ytitle(" ")
	graph save both_3, replace
	graph twoway line both_avg _j if protest_category_both == 4, yline(0) scheme(s2mono) title("Surf & Sustain") xlabel(1 "4w before" 2 "3w before" 3 "2w before" 4 "1w before" 5 "1w after" 6 "2w after" 7 "3w after" 8 "4w after", angle(45)) xscale(range(0.5 8.5)) ylabel(-0.02 "-2%" 0 "0%" 0.02 "+2%" 0.04 "+4%" 0.06 "+6%" 0.08 "+8%" 0.10 "+10%" 0.12 "+12%", labsize(vsmall)) xtitle(" ") ytitle(" ")
	graph save both_4, replace
	graph combine both_0.gph both_1.gph both_2.gph both_3.gph both_4.gph, scheme(s2mono) 
	// graph export "c:\temp\20210329_GraphCategories.jpg", as(jpg) replace width(800) height(1200) 


	// Figure 3: marginal effect of focusing event / ongoing crisis (based on interaction in model 5)
	// ///////////////////////////////////////////////////////////////////////////////////////
	use "makingtheirmark_workingfile.dta", clear
	
	*model5.
	regress mediaatt_both_w5 N_newsturnout10000 N_discexp_combo union_d D_diversity_d U_agreetyp_d d_PP_sumscale C_other_actie_d C_campagne_past C_campagne_toekomst c.d_ttest_both_w4 i.FE_focusingevent i.FE_routine i.FE_ongoingcrisis c.d_ttest_both_w4#i.FE_focusingevent c.d_ttest_both_w4#i.FE_routine c.d_ttest_both_w4#i.FE_ongoingcrisis  duur d_vrt d_issue1 d_issue2 d_issue4 - d_issue11
	margins, dydx(FE_focusingevent) at(d_ttest_both_w4 = (0 1))
	marginsplot, recast(scatter) yline(0) xlabel(0 "Not surfing" 1 "Surfing", labsize(small)) xscale(range(-0.5 1.5)) xtitle(" ") ytitle("Marginal effect", size(small)) title("Focusing event") scheme(s2mono) ylabel(-0.02 "-2%" 0 "0%" 0.02 "+2%" 0.04 "+4%" 0.06 "+6%" 0.08 "+8%" 0.10 "+10%", labsize(vsmall))
	graph save interaction_1, replace
	margins, dydx(FE_ongoingcrisis) at(d_ttest_both_w4 = (0 1))
	marginsplot, recast(scatter) yline(0) xlabel(0 "Not surfing" 1 "Surfing", labsize(small)) xscale(range(-0.5 1.5)) xtitle(" ") ytitle("Marginal effect", size(small)) title("Ongoing crisis") scheme(s2mono) ylabel(-0.02 "-2%" 0 "0%" 0.02 "+2%" 0.04 "+4%" 0.06 "+6%" 0.08 "+8%" 0.10 "+10%", labsize(vsmall))
	graph save interaction_2, replace
	graph combine interaction_1.gph interaction_2.gph, scheme(s2mono)
	// graph export "Figure3.jpg", as(jpg) replace width(5000) height(2500) 



// Analysis - Appendices
// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////

	// Table B1 - For all 177 issues, the mean issue attention in the year prior, mean in the week post protest, min, max, and number of protests
	// ///////////////////////////////////////////////////////////////////////////////////////
	use "makingtheirmark_workingfile.dta", clear
	gen mediaatt_w5_notmeancentered = mediaatt_both_yearbefore + mediaatt_both_w5
	collapse (mean) mediaatt_both_yearbefore mediaatt_w5_notmeancentered (min) min_att = mediaatt_w5_notmeancentered (max) max_att = mediaatt_w5_notmeancentered (count) numberprotests = mediaatt_w5_notmeancentered, by(ProtestIssue)
	gsort- numberprotests
	export excel using "TableB1_ProtestIssueTable.xls", firstrow(variables) replace


	// Table D1: descriptives
	// ///////////////////////////////////////////////////////////////////////////////////////
	use "makingtheirmark_workingfile.dta", clear
	// Protest features
	summarize N_newsturnout10000 N_discexp_combo union_d D_diversity_d U_agreetyp_d d_PP_sumscale C_other_actie_d C_campagne_past C_campagne_toekomst
	// Media features
	summarize d_ttest_both_w4 FE_focusingevent FE_routine FE_ongoingcrisis
	// Control variables
	summarize duur d_vrt
	summarize d_issue2-d_issue11 d_issue1, separator(0)
	

	// Figure E1: media attention for protest issue throughout the 8 weeks.
	// ///////////////////////////////////////////////////////////////////////////////////////
	use "makingtheirmark_workingfile.dta", clear
	rename mediaatt_both_w1_noprotest  mediaatt_both_np_w1
	rename mediaatt_both_w2_noprotest  mediaatt_both_np_w2
	rename mediaatt_both_w3_noprotest  mediaatt_both_np_w3
	rename mediaatt_both_w4_noprotest  mediaatt_both_np_w4 
	rename mediaatt_both_w5_noprotest  mediaatt_both_np_w5 
	rename mediaatt_both_w6_noprotest  mediaatt_both_np_w6 
	rename mediaatt_both_w7_noprotest  mediaatt_both_np_w7 
	rename mediaatt_both_w8_noprotest  mediaatt_both_np_w8 
	
	rename mediaatt_both_w5_nodayprotest mediaatt_both_noday_w5 
	gen mediaatt_both_noday_w1 = mediaatt_both_w1 
	gen mediaatt_both_noday_w2 = mediaatt_both_w2
	gen mediaatt_both_noday_w3 = mediaatt_both_w3
	gen mediaatt_both_noday_w4 = mediaatt_both_w4
	gen mediaatt_both_noday_w6 = mediaatt_both_w6
	gen mediaatt_both_noday_w7 = mediaatt_both_w7
	gen mediaatt_both_noday_w8 = mediaatt_both_w8
		
	reshape long mediaatt_both_w mediaatt_both_np_w mediaatt_both_noday_w, i(id)
	collapse (mean) both_avg = mediaatt_both_w both_avg_np = mediaatt_both_np_w both_avg_nd = mediaatt_both_noday_w , by(_j)
	
	graph twoway line both_avg both_avg_np both_avg_nd _j, yline(0) scheme(s2mono) title("Media Attention for Protest Issue") xlabel(1 "4w before" 2 "3w before" 3 "2w before" 4 "1w before" 5 "1w after" 6 "2w after" 7 "3w after" 8 "4w after", angle(45)) xscale(range(0.5 8.5)) ylabel(-0.01 "-1%" 0 "0%" 0.01 "+1%" 0.02 "+2%" 0.03 "+3%"  0.04 "+4%") xtitle(" ") ytitle(" ") legend(order(1 "All coverage" 2 "Coverage excl. protest items" 3 "Coverage excl. day of protest") size(small))
	// graph export "c:\temp\20210329_MakingMark_FigureE1.jpg", as(jpg) replace width(1000) height(1000) 
	
	
	// Table E1 - Replication of the regression analyses, but this time excluding protest coverage
	// ///////////////////////////////////////////////////////////////////////////////////////
	use "makingtheirmark_workingfile.dta", clear
	
	// Media attention variable expressed as 0 to 100 instead of 0.00 to 1.00 for readability of coefficients
	gen mediaatt_both_w5_noprotest_100 = mediaatt_both_w5_noprotest * 100
	
	regress mediaatt_both_w5_noprotest_100 N_newsturnout10000 N_discexp_combo union_d D_diversity_d U_agreetyp_d d_PP_sumscale C_other_actie_d C_campagne_past C_campagne_toekomst
	// outreg2 using "c:\temp\20210408_tableA1_m1",  word dec(2) replace alpha(0.001, 0.01, 0.05, 0.10) symbol(***,**,*,+) sideway
	regress mediaatt_both_w5_noprotest_100 d_ttest_both_w4 FE_focusingevent FE_routine FE_ongoingcrisis
	// outreg2 using "c:\temp\20210408_tableA1_m2",  word dec(2) replace alpha(0.001, 0.01, 0.05, 0.10) symbol(***,**,*,+) sideway
	regress mediaatt_both_w5_noprotest_100 N_newsturnout10000 N_discexp_combo union_d D_diversity_d U_agreetyp_d d_PP_sumscale C_other_actie_d C_campagne_past C_campagne_toekomst d_ttest_both_w4 FE_focusingevent FE_routine FE_ongoingcrisis
	// outreg2 using "c:\temp\20210408_tableA1_m3",  word dec(2) replace alpha(0.001, 0.01, 0.05, 0.10) symbol(***,**,*,+) sideway
	regress mediaatt_both_w5_noprotest_100 N_newsturnout10000 N_discexp_combo union_d D_diversity_d U_agreetyp_d d_PP_sumscale C_other_actie_d C_campagne_past C_campagne_toekomst d_ttest_both_w4 FE_focusingevent FE_routine FE_ongoingcrisis duur d_vrt d_issue2- d_issue11
	// outreg2 using "c:\temp\20210408_tableA1_m4",  word dec(2) replace alpha(0.001, 0.01, 0.05, 0.10) symbol(***,**,*,+) sideway
	regress mediaatt_both_w5_noprotest_100 N_newsturnout10000 N_discexp_combo union_d D_diversity_d U_agreetyp_d d_PP_sumscale C_other_actie_d C_campagne_past C_campagne_toekomst c.d_ttest_both_w4 i.FE_focusingevent i.FE_routine i.FE_ongoingcrisis c.d_ttest_both_w4#i.FE_focusingevent c.d_ttest_both_w4#i.FE_routine c.d_ttest_both_w4#i.FE_ongoingcrisis  duur d_vrt d_issue2- d_issue11
	// outreg2 using "c:\temp\20210408_tableA1_m5",  word dec(2) replace alpha(0.001, 0.01, 0.05, 0.10) symbol(***,**,*,+) sideway


	// Table E2 - Replication of the regression analyses, but this time excluding the day of the protest
	// ///////////////////////////////////////////////////////////////////////////////////////
	use "makingtheirmark_workingfile.dta", clear

	// Media attention variable expressed as 0 to 100 instead of 0.00 to 1.00 for readability of coefficients
	gen mediaatt_both_w5_noday_100 = mediaatt_both_w5_nodayprotest * 100
	
	regress mediaatt_both_w5_nodayprotest N_newsturnout10000 N_discexp_combo union_d D_diversity_d U_agreetyp_d d_PP_sumscale C_other_actie_d C_campagne_past C_campagne_toekomst
	// outreg2 using "c:\temp\20210408_tableA2_m1",  word dec(2) replace alpha(0.001, 0.01, 0.05, 0.10) symbol(***,**,*,+) sideway
	regress mediaatt_both_w5_noday_100 d_ttest_both_w4 FE_focusingevent FE_routine FE_ongoingcrisis
	// outreg2 using "c:\temp\20210408_tableA2_m2",  word dec(2) replace alpha(0.001, 0.01, 0.05, 0.10) symbol(***,**,*,+) sideway
	regress mediaatt_both_w5_noday_100 N_newsturnout10000 N_discexp_combo union_d D_diversity_d U_agreetyp_d d_PP_sumscale C_other_actie_d C_campagne_past C_campagne_toekomst d_ttest_both_w4 FE_focusingevent FE_routine FE_ongoingcrisis
	// outreg2 using "c:\temp\20210408_tableA2_m3",  word dec(2) replace alpha(0.001, 0.01, 0.05, 0.10) symbol(***,**,*,+) sideway
	regress mediaatt_both_w5_noday_100 N_newsturnout10000 N_discexp_combo union_d D_diversity_d U_agreetyp_d d_PP_sumscale C_other_actie_d C_campagne_past C_campagne_toekomst d_ttest_both_w4 FE_focusingevent FE_routine FE_ongoingcrisis duur d_vrt d_issue2- d_issue11
	// outreg2 using "c:\temp\20210408_tableA2_m4",  word dec(2) replace alpha(0.001, 0.01, 0.05, 0.10) symbol(***,**,*,+) sideway
	regress mediaatt_both_w5_noday_100 N_newsturnout10000 N_discexp_combo union_d D_diversity_d U_agreetyp_d d_PP_sumscale C_other_actie_d C_campagne_past C_campagne_toekomst c.d_ttest_both_w4 i.FE_focusingevent i.FE_routine i.FE_ongoingcrisis c.d_ttest_both_w4#i.FE_focusingevent c.d_ttest_both_w4#i.FE_routine c.d_ttest_both_w4#i.FE_ongoingcrisis  duur d_vrt d_issue2- d_issue11
	// outreg2 using "c:\temp\20210408_tableA2_m5",  word dec(2) replace alpha(0.001, 0.01, 0.05, 0.10) symbol(***,**,*,+) sideway


	// Table E3 - Split VRT/VTM regression
	// ///////////////////////////////////////////////////////////////////////////////////////
	use "makingtheirmark_workingfile.dta", clear

	gen mediaatt_VRT_w5_100 = mediaatt_VRT_w5 * 100
	gen mediaatt_VTM_w5_100 = mediaatt_VTM_w5 * 100

	regress mediaatt_VRT_w5_100 N_newsturnout10000 N_discexp_combo union_d D_diversity_d U_agreetyp_d d_PP_sumscale C_other_actie_d C_campagne_past C_campagne_toekomst d_ttest_both_w4 FE_focusingevent FE_routine FE_ongoingcrisis duur d_issue2- d_issue11 if d_vrt == 1
	// outreg2 using "c:\temp\20210408_tableA3_m1",  word dec(2) replace alpha(0.001, 0.01, 0.05, 0.10) symbol(***,**,*,+) sideway
	regress mediaatt_VRT_w5_100 N_newsturnout10000 N_discexp_combo union_d D_diversity_d U_agreetyp_d d_PP_sumscale C_other_actie_d C_campagne_past C_campagne_toekomst c.d_ttest_both_w4 i.FE_focusingevent i.FE_routine i.FE_ongoingcrisis c.d_ttest_both_w4#i.FE_focusingevent c.d_ttest_both_w4#i.FE_routine c.d_ttest_both_w4#i.FE_ongoingcrisis  duur  d_issue2- d_issue11 if d_vrt == 1
	// outreg2 using "c:\temp\20210408_tableA3_m2",  word dec(2) replace alpha(0.001, 0.01, 0.05, 0.10) symbol(***,**,*,+) sideway
	
	regress mediaatt_VTM_w5_100 N_newsturnout10000 N_discexp_combo union_d D_diversity_d U_agreetyp_d d_PP_sumscale C_other_actie_d C_campagne_past C_campagne_toekomst d_ttest_both_w4 FE_focusingevent FE_routine FE_ongoingcrisis duur  d_issue2- d_issue11 if d_vrt == 0
	// outreg2 using "c:\temp\20210408_tableA3_m3",  word dec(2) replace alpha(0.001, 0.01, 0.05, 0.10) symbol(***,**,*,+) sideway
	regress mediaatt_VTM_w5_100 N_newsturnout10000 N_discexp_combo union_d D_diversity_d U_agreetyp_d d_PP_sumscale C_other_actie_d C_campagne_past C_campagne_toekomst c.d_ttest_both_w4 i.FE_focusingevent i.FE_routine i.FE_ongoingcrisis c.d_ttest_both_w4#i.FE_focusingevent c.d_ttest_both_w4#i.FE_routine c.d_ttest_both_w4#i.FE_ongoingcrisis  duur  d_issue2- d_issue11 if d_vrt == 0
	// outreg2 using "c:\temp\20210408_tableA3_m4",  word dec(2) replace alpha(0.001, 0.01, 0.05, 0.10) symbol(***,**,*,+) sideway

